<h1>Listing notices</h1>

<table>
  <tr>
  <% for column in Notice.content_columns %>
    <th><%= column.human_name %></th>
  <% end %>
  </tr>
  
<% for notice in @notices %>
  <tr>
  <% for column in Notice.content_columns %>
    <td><%=h notice.send(column.name) %></td>
  <% end %>
    <td><%= link_to 'Show', :action => 'show', :id => notice %></td>
    <td><%= link_to 'Edit', :action => 'edit', :id => notice %></td>
    <td><%= link_to 'Destroy', { :action => 'destroy', :id => notice }, :confirm => 'Are you sure?', :method => :post %></td>
  </tr>
<% end %>
</table>

<%= will_paginate @notices %>

<br />

<%= link_to 'New notice', :action => 'new' %>
